<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>氚专开发者共创文档</title>
    <link rel="icon" href="favicon.ico" />
    <link rel="stylesheet" href="./css/vue.css">
</head>

<body>
    <div id="app">文档加载中，先思考一下...</div>
    <script>
        var docName = "h3yun-pro-doc";
        var repo = "https://gitee.com/h3yun-pro-public/h3yun-pro-doc";
        var editUrl = "https://gitee.com/-/ide/project/h3yun-pro-public/h3yun-pro-doc/edit/quick/-/";

        //docsify配置
        window.$docsify = {
            name: "氚专开发者共创文档",
            loadSidebar: true, // 开启侧边导航栏
            subMaxLevel: 2,
            // autoHeader: true, // 自动为文档添加标题
            auto2top: true, // 切换文档自动跳转到顶部
            repo: repo, //仓库地址，并会显示页面右上角github仓库标
            formatUpdated: "{YYYY}/{MM}/{DD} {HH}:{mm}",//{docsify-updated}占位符的日期格式
            alias: {
                "/doc/_sidebar.md": "/_sidebar.md" //将doc目录下的sidebar导航回主sidebar
            },
            plugins: [
                function (hook, vm) {
                    hook.beforeEach(function (content) {
                        content = fileUrlSupplement(content);

                        var editDoc = `[📝 在线编辑](${editUrl}${vm.route.file}) - {docsify-updated} \n`;
                        var powered = `\n\n----\n\n[![Fork me on Gitee](${repo}/widgets/widget_6.svg)](${repo})\n\n`;

                        return (
                            editDoc +
                            content +
                            powered
                        );
                    });
                }
            ],
            search: {
                maxAge: 86400000, // 过期时间，单位毫秒，默认一天
                paths: "auto",
                placeholder: "搜索",
                noData: "找不到结果",
                depth: 6,// 搜索标题的最大层级, 1 - 6
                hideOtherSidebarContent: false, // 是否隐藏其他侧边栏内容
            },
            tabs: {
                persist: true,      // 页面刷新/重新访问后是否恢复选项卡选择
                sync: true,         // 是否将在具有匹配标签的选项卡之间同步选项卡选择
                theme: 'classic',   // 主题样式，'classic', 'material', false
                tabComments: true,  // 是否可以使用选项卡注释定义选项卡集中的选项卡
                tabHeadings: true   // 是否可以使用标题+粗体标记定义选项卡集中的选项卡
            },
            copyCode: {
                buttonText: '一键复制',
                errorText: '复制失败',
                successText: '复制完成'
            },
            count: {
                countable: true,
                fontsize: '0.9em',
                color: 'rgb(90,90,90)',
                language: 'chinese'
            }
        };

        var isLocalEnv = (location.hostname == "127.0.0.1" || location.hostname == "localhost");

        //文档离线化（本地预览环境不开启）
        if (!isLocalEnv && typeof navigator.serviceWorker !== "undefined") {
            //navigator.serviceWorker.register("./js/sw.js");
        }

        //线上环境时，改正文件下载url
        function fileUrlSupplement(content) {
            if (!isLocalEnv) {
                return content.replace(/\[.+\]\(\s*\/file.+\)/g, function (item) {
                    return item.replace("/file/", `/${docName}/file/`);
                });
            }
            return content;
        }
    </script>


    <script src="//cdn.jsdelivr.net/npm/docsify@4.13.0/lib/docsify.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify-tabs@1.6.0/dist/docsify-tabs.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify@4.13.0/lib/plugins/search.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify@4.13.0/lib/plugins/zoom-image.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify-copy-code@2.1.1/dist/docsify-copy-code.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-csharp.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-sql.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-json.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify-count@1.1.0/dist/countable.min.js"></script>
</body>

</html>